package com.yy.permissions_general.module.system.schedule.task;

import com.yy.permissions_general.module.system.schedule.handler.base.BaseTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;

/**
 * @Description: TODO 示例任务
 * @Author: YangYI
 * @Date: 2022/1/24
**/
@Slf4j
@Component("exceptionTask")
public class ExceptionTaskImpl implements BaseTaskService {
    private static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    /**
     * 任务实现
     */
    @Override
    public void run(String params) throws Exception {
        throw new Exception("发生异常");
    }
}
